package com.sitech.component;

public class Page
{
	private int total;
	private int pageSize;
	private int page;
	private int records;
	
	
	public Page(int pageSize, int records)
	{
		this.records = records;
		this.pageSize = pageSize;
		total = records%pageSize == 0 ? records/pageSize : records /pageSize + 1;
	}
	public Page()
	{
		
	}
	public int getTotal()
	{
		return total;
	}
	public void setTotal(int total)
	{
		this.total = total;
	}
	public int getPageSize()
	{
		return pageSize;
	}
	public void setPageSize(int pageSize)
	{
		this.pageSize = pageSize;
	}
	public int getPage()
	{
		return page;
	}
	public void setPage(int page)
	{
		this.page = page;
	}
	public int getRecords()
	{
		return records;
	}
	public void setRecords(int records)
	{
		if(this.pageSize > 0 )
		{
			total = records/pageSize + 1;
		}
		this.records = records;
	}
	

}
